
#ifndef __REMOTE_H
#define __REMOTE_H

#include "gd32f30x.h"


#define REMOTE_RCU_GPIOx     RCU_GPIOB
#define REMOTE_GPIOx         GPIOB
#define REMOTE_GPIO_PINx     GPIO_PIN_1

typedef union
{
    struct
    {
				uint8_t FrameHeader;
				uint8_t Cmd;
				uint8_t Mode; //shijian
				uint8_t Offices;
				
				uint8_t Room;
				uint8_t Address[3];
				
				uint8_t Checksum;
				uint8_t FrameTail;
				
    } Info;
    uint8_t Byte[32];
} RemoteInfo_union;

typedef struct
{
	
	uint8_t BitCount;
	uint8_t ByteCount;
	uint8_t Byte;
	bool ReceivingCompleted;
	bool StartSignal;
	bool GuideCode;
	bool SynchronizationCode;
	RemoteInfo_union Remote;
	uint32_t remoteRecieveTime;

	
} RemoteRecieve_struct;


void vremoteInit(void);
void vremoteRecieveData(void);
	
	
#endif

